<table style="width: 100%;" cellpadding="4" cellspacing="0">
	<tr>
		<td class="border2">

			<table style="width: 100%;" class="mainmenu5" cellpadding="0" cellspacing="0" border="0">
				<tr>
					<td width="7"><img src="design/pic/spacer.gif" class="sqr1" alt="" height="7" width="7" /></td>
					<td class="block_header">{$sBoxName}</td>
				</tr>
			</table>

{if $aPrev}
	<table style="width: 100%;" cellpadding="4" cellspacing="4">
	<tr>
		<td class="border2">

			<table style="width: 100%;" class="mainmenu5" cellpadding="0" cellspacing="0" border="0">
				<tr>
					<td width="7"><img src="design/pic/spacer.gif" class="sqr1" alt="" height="7" width="7" /></td>
					<td class="block_header">{language text="preview"}</td>
				</tr>
			</table>
			<br />

			{$aPrev.text}
		</td>
	</tr>
</table>
{/if}
{if $sSend}
<div style="padding-left:30px;font-size:10pt;"><b>{language text="your_message_has_been_sent_to"}: <a href="{url link=public.user name=$sSend}">{$sSend}</a></b> <br /><br />


		<div class="list"><a class="link_action" href="{url link=public.account.messages}">[ {language text="go_to_inbox"} ]</a></div>
		<div class="list"><a class="link_action" href="{url link=public.account.messages box=sentbox}">[ {language text="go_to_sentbox"} ]</a></div>
		<div class="list"><a class="link_action" href="{url link=public.account.messages.compose}">[ {language text="compose_new_message"} ]</a></div>
		<div class="list"><a class="link_action" href="{url link=public.account}">[ {language text="return_to_my_account"} ]</a></div>


</div>
{else}
<div style="padding-left: 5px;"><br />
{$jsValMess}
<div style="padding-left: 30px; font-size: 10pt;"><b>{messages block="Compose"}</b></div>
<form method="post"	action="{$sUrl}" onsubmit="{$jsValidation}">
<div><input type="hidden" name="sRec" value="{$sRec}" /></div>
{if $bSingle}
<table>
	<tr>
		<td>
		<input type="hidden" name="bSingle" value="1" />
			<a href="{url link=public.user name=$sRecipient}">
                {Account::Avatar sUser=$sRecipient iSize=75 class="pic1" onmouseover="showInfo5('`$sRecipient`', '', '');this.className='pic2';" onmouseout="this.className='pic1';return nd();"}
			</a>
		</td>
		<td style="font-size:12pt;" class="color"><b><a href="{url link=public.user name=$sRecipient}">{$sRecipient}</a></b></td>
	</tr>
</table>
{/if}

<div style="padding-top: 10px;">
    <table style="width:100%;" cellspacing="2" cellpadding="4">
    {if !$bSingle}
    <tr>
        <td style="text-align:right; vertical-align:top;" class="color"><span class="star">*</span> {language text="to"}:</td>
        <td class="border13" style="white-space: nowrap; vertical-align:top;">
    		<input style="width:300px;" maxlength="60" value="{if $aMess.to}{$aMess.to}{else}{language text='Mod_Messenger.search_for_your_friends'}{/if}" onclick="if ( this.value == '{language text='Mod_Messenger.search_for_your_friends'}' ) this.value=''; " id="to" name="aMess[to]" size="40" onfocus="this.className='inputmain';" onblur="this.className='';" autocomplete="off" onkeyup="xajax_searchMyFriends(this.value, 'search_box', 'sId(\'to\').value=\'%s\';', '3');" type="text">
			<div style="position: relative;">
				<div id="search_box" style="display:none; width:300px; position:absolute;" class="border2 hidClass">
				</div>
			</div>
        </td>
    </tr>
    {else}
    	<input value="{$sRecipient}" name="aMess[to]" type="hidden" />
    {/if}
    <tr>
        <td style="text-align:right; white-space: nowrap" class="color" ><span class="star">*</span> {language text="subject"}:</td>
        <td class="border13">
            <input style="width:300px;" value="{if $aMailInfo}{language text='re'}: {$aMailInfo.title|clean|escape}{else}{$aMess.title}{/if}" maxlength="60" id="user" name="aMess[title]" size="40" onfocus="this.className='inputmain';" onblur="this.className='';" type="text" />
        </td>
    </tr>
    <tr>
        <td colspan="2">
        <div style="padding-bottom: 6px; padding-top:20px;">
        <label for="maintext">
            <span style="vertical-align: top;">{language text="message"}</span>
        </label>
        <div style="padding: 4px;">
            <textarea style="width:100%;" cols="60" rows="20" id="maintext" name="aMess[text]" onfocus="this.style.backgroundColor='#fff';" onblur="this.style.backgroundColor='#F6F6F6';">{$aMess.text}</textarea>
        </div>
        {include file="$sMainTemplatePath/_blocks/smilies.html"}
        </td>
    </tr>
    <tr>
        <td colspan="2">
            <input style="cursor: pointer;" name="act[sSend]" value="{language text="send_message_452"}" type="submit" class="mainmenu6" onmouseover="this.className='mainmenu7';" onmouseout="this.className='mainmenu6';">
            <input style="cursor: pointer;" name="act[sPrev]" value="{language text="preview_456"}" type="submit" class="mainmenu6" onmouseover="this.className='mainmenu7';" onmouseout="this.className='mainmenu6';">
            <span style="padding-left: 20px; font-size: 7pt;">
                <a class="link_action" href="javascript:void(0);" onclick="popUp2('{url link=public.popup.help}','500','500','yes','200','100');">[ {language text="html_guide"} ]</a>
            </span>
            <div style="padding:5px; margin-top:5px;">
            <span class="star">*</span> - {language text="mandatory_fields"}
            </div>
        </td>
    </tr>
    </table>
</div>
</form>
</div>
{/if}

		</td>
	</tr>
</table>